export const constantRouter = [
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Layout',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/home',
        children: [
            {
                path: '/home',
                component: () => import('@/views/home/index.vue'),
                meta: {
                    title: '首页',
                    hidden: false,
                    icon: 'HomeFilled',
                },
            },
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Mall',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/mall',
        children: [
            {
                path: '/mall',
                component: () => import('@/views/mall/index.vue'),
                meta: {
                    title: '商城中心',
                    hidden: false,
                    icon: 'Goods',
                },
            },
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'productDetails',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/productDetails',
        children: [
            {
                path: '/productDetails',
                component: () => import('@/views/mall/component/productDetails/index.vue'),
                meta: {
                    title: '商品详情',
                    hidden: true,
                    icon: '',
                },
            },
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'usersDetails',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/usersDetails',
        children: [
            {
                path: '/usersDetails',
                component: () => import('@/views/users/component/userDetails/index.vue'),
                meta: {
                    title: '个人中心',
                    hidden: true,
                    icon: 'User',
                },
            },
        ],
    },
    {
        path: '/login',
        component: ()=>import('@/views/login/index.vue'),
        name: 'Login',
        meta: {
            title: '登录页面',
            hidden: true,
        }
    },
    {
        path: '/register',
        component: ()=>import('@/views/register/index.vue'),
        name: 'Register',
        meta: {
            title: '注册页面',
            hidden: true,
        }
    },
    {
        path: '/404',
        component: ()=>import('@/views/404/index.vue'),
        name: '404',
        meta: {
            title: '404',
            hidden: true,
        }
    },
]

export const asyncRoute = [
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Screen',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/screen',
        children: [
            {
                path: '/screen',
                component: () => import('@/views/screen/index.vue'),
                name: 'Screen',
                meta: {
                    title: '数据大屏',
                    hidden: false,
                    icon: 'Platform',
                },
            },
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Users',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/users',
        children: [
            {
                path: '/users',
                component: () => import('@/views/users/index.vue'),
                name: 'Users',
                meta: {
                    title: '用户管理',
                    hidden: false,
                    icon: 'User',
                },
            },
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Merchants',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/merchants',
        children: [
            {
                path: '/merchants',
                component: () => import('@/views/merchants/index.vue'),
                name: 'Merchants',
                meta: {
                    title: '商家管理',
                    hidden: true,
                    icon: 'UserFilled',
                },
            },
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Share',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/share',
        children: [
            {
                path: '/share',
                component: () => import('@/views/share/index.vue'),
                name: 'Share',
                meta: {
                    title: '社区分享',
                    hidden: false,
                    icon: 'BellFilled',
                },
            },
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Cart',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/cart',
        children: [
            {
                path: '/cart',
                component: () => import('@/views/cart/index.vue'),
                name: 'Cart',
                meta: {
                    title: '购物车',
                    hidden: false,
                    icon: 'ShoppingCart',
                },
            },
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Favorite',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/favorite',
        children: [
            {
                path: '/favorite',
                component: () => import('@/views/favorite/index.vue'),
                name: 'Favorite',
                meta: {
                    title: '我的收藏',
                    hidden: false,
                    icon: 'StarFilled',
                },
            },
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'MyOrder',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/myorder',
        children: [
            {
                path: '/myorder',
                component: () => import('@/views/myorder/index.vue'),
                name: 'MyOrder',
                meta: {
                    title: '我的订单',
                    hidden: false,
                    icon: 'SuitcaseLine',
                },
            },
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Product',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/product',
        children: [
            {
                path: '/product',
                component: () => import('@/views/product/index.vue'),
                name: 'Product',
                meta: {
                    title: '商品管理',
                    hidden: false,
                    icon: 'Handbag',
                },
            }
        ],
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'Order',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/order',
        children: [
            {
                path: '/order',
                component: () => import('@/views/order/index.vue'),
                name: 'Order',
                meta: {
                    title: '订单管理',
                    hidden: false,
                    icon: 'Notebook',
                },
            }
        ],
    }
]

export const anyRoute = {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
        title: '任意路由',
        hidden: true,
    },
}